package com.linkage.usercenter.feign;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/* *
 * @describe:  类型描述
 * @author shaofeng.cheng
 * @title
 * @date 2020/4/21 20:57
 * @param
 * @return
 * @version: V1.0
 */
// @RestController
// @RequestMapping("/home")
@FeignClient(name = "cclaim-common-server",url="${customer.third-platform-config.third-sys-home-url}", fallback = HomeManageFeign.HomeManageFeignFallback.class)
public interface  HomeManageFeign  {

    @GetMapping(value = "/getsecurityguardinfo")
     public String test(@RequestParam(value = "idnumber") String idnumber);
    /* *
     * @describe:  类型描述 身份证号为18位身份证号 查询人员信息
     * @author shaofeng.cheng
     * @title getUserInfo
     * @date 2020/4/30 22:43
     * @param [personCardNumber]
     * @return java.lang.String
     * @version: V1.0
     */
    @RequestMapping(value = "/getsecurityguardinfo", method = RequestMethod.GET)
    public String getSecurityGuardInfo(@RequestParam(value = "idnumber", required = true) String personCardNumber);

    /* *
     * @describe:  类型描述 新增保安信息
     * @author shaofeng.cheng
     * @title
     * @date 2020/5/2 0:55
     * @param
     * @return
     * @version: V1.0
     */
    @RequestMapping(value = "/savesecurityguardinfo", method = RequestMethod.POST)
    public String saveSecurityGuardInfo(@RequestBody String query);

    @Component
    class HomeManageFeignFallback implements HomeManageFeign {

        private final Logger logger = LoggerFactory.getLogger(this.getClass());


        @Override
        public String test(String idnumber) {
            return null;
        }

        @Override
        public String getSecurityGuardInfo(String personCardNumber) {
            return null;
        }

        @Override
        public String saveSecurityGuardInfo(String query) {
            return null;
        }
    }
}